<template>
    <div id="credit"></div>
    <div id="cesiumContainer"></div>
</template>
<script lang="ts" setup>
import * as Cesium from 'cesium';
import { ACCESS_TOKEN } from '../../utils/constant';
import { negativeX, negativeY, negativeZ, positiveX, positiveY, positiveZ } from '../../utils/constant';
Cesium.Ion.defaultAccessToken = ACCESS_TOKEN;
/**
 * Viewer查看器
 */
const initMap = () => {
    const viewer = new Cesium.Viewer('cesiumContainer', {
        // 是否显示信息窗口
        infoBox: false,
        // 是否显示查询框
        geocoder: false,
        // 是否显示home按钮
        homeButton: false,
        // 切换3D和2D的按钮
        sceneModePicker: false,
        // 切换图层按钮
        baseLayerPicker: false,
        // 更多帮助按钮
        navigationHelpButton: false,
        // 动画表盘
        animation: false,
        creditContainer: 'credit',
        timeline: false,
        fullscreenButton: false,
        vrButton: false,
        skyBox: new Cesium.SkyBox({
            sources: {
                positiveX,
                negativeX,
                positiveY,
                negativeY,
                positiveZ,
                negativeZ
            }
        })
    });
    // 设置显示fps
    viewer.scene.debugShowFramesPerSecond = false;
};
onMounted(() => {
    initMap();
});
</script>
<style lang="scss" scoped></style>
